package cn.z2huo.algorithm.stack.infixToPostfix;

import java.util.Arrays;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class Demo {
	public static void main(String[] args) {
		String str = "3.6 + 6 * 2.1 + ( 8 * 1.2 + 2 )";
		String[] strArray = str.split(" ");
		System.out.println(Arrays.toString(strArray));
		
		System.out.println(Arrays.toString(str.split("[\\d^.]+")));
		System.out.println(Arrays.toString(str.split("")));
		
		String pattern ="[\\d^.]+[*/()+-]+";
		Pattern r = Pattern.compile(pattern);
		Matcher matcher = r.matcher(str);
	}
}
